﻿using System;

namespace enyo
{
    public abstract class DomNodeBuilder : DomNode
    {
        /// <summary>
        /// When false, content is treated as plain text; 
        /// when true, it's treated as HTML. Only set this to true when you trust the content because you generated it yourself or because you've already stripped off potentially malicious tags.
        /// </summary>
        public bool AllowHtml { get; set; }

        /// <summary>
        /// The content that will be put inside the DOM node created
        /// </summary>
        public string Content { get; set; }

        /// <summary>
        /// Hides this node (alias for setShowing(false)).
        /// </summary>
        public void Hide()
        {
        }

        /// <summary>
        /// Renders this object into DOM, generating a DOM node if needed.
        /// </summary>
        public void Render()
        {
        }

        /// <summary>
        /// Renders this object into the existing DOM node referenced by inParentNode.
        /// </summary>
        /// <param name="parentNode"></param>
        public void RenderInto(System.Html.DOM.HtmlElement parentNode)
        {
        }

        /// <summary>
        /// Called whenever this object has been rendered. Override this method to perform tasks that require access to an actual DOM node.        
        /// </summary>
        public virtual void Rendered()
        {
        }

        /// <summary>
        /// Shows this node (alias for setShowing(true)).
        /// </summary>
        public void Show()
        {
        }
    }
}
